package com.cdvtc.news.service.impl;

import com.cdvtc.news.dao.AdminDao;
import com.cdvtc.news.entity.Admin;
import com.cdvtc.news.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminDao adminDao;

    @Override
    public Admin getAdminById(int adminId) {
        return adminDao.getAdminById(adminId);
    }

    @Override
    public Admin login(String account, String password) {
        return adminDao.login(account, password);
    }

    @Override
    public List<Admin> getAllAdmins() {
        return adminDao.getAllAdmins();
    }
}
